package com.qzsoft.zhjd.server.modules.ludong.exp.service.impl;

import com.qzsoft.zhjd.server.modules.ludong.exp.mapper.CollectStressMachineMapper;
import com.qzsoft.zhjd.server.modules.ludong.exp.entity.CollectStressMachineEntity;
import com.qzsoft.zhjd.server.modules.ludong.exp.service.CollectStressMachineService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service("stressMachineService")
public class CollectStressMachineServiceImpl extends ServiceImpl<CollectStressMachineMapper, CollectStressMachineEntity> implements CollectStressMachineService {


    /**
     * 功能描述: 先删除后添加
     * @param collectStressMachineEntity 实体类
     * @return : void
     * @author : liugf
     * @date : 2020/6/10 20:39
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insertAndRemoveData(CollectStressMachineEntity collectStressMachineEntity) {
        removeById(collectStressMachineEntity.getId());
        save(collectStressMachineEntity);
    }

}
